package com.book.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@Accessors(chain = true)
@TableName("customer_money")
public class Money {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("username")
    private String username;

    @TableField("payment")
    private Integer payment;

    @TableField("type")
    private String type;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(value = "createtime",fill = FieldFill.INSERT)
    private Date createtime;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "updatetime",fill = FieldFill.INSERT_UPDATE)
    private Date updatetime;

    /**
    * @Description: 订单id，退书时方便退款
    * @Author: Mr.Zhang
    * @Date: 2021/1/26
    */
    @TableField("bookindentid")
    private String bookindentid;

    /*0不显示1显示*/
    @TableField("omit")
    private String omit;
}
